﻿using System;
using System.Web.UI;
using BLL;

public partial class ProductPCBAging_ViewPCBAging_ViewPCBAgingbySN : System.Web.UI.Page
{
    private PCBAging pag;
    //private static string pCBAgingID, pCBSN;

    public ProductPCBAging_ViewPCBAging_ViewPCBAgingbySN()
    {
        pag = new PCBAging();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string pCBSN = this.TextBox1.Text.Trim();
        string pCBAgingID = pag.GetIDbySN(pCBSN);
        if (string.IsNullOrEmpty(pCBAgingID))
        {
            string str1 = "此腔体序列号没有做过" + pCBAgingID;
            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "click", "<script>alert('" + str1 + "');</script>", false);
        }
        else
        {
            BindPCBAging(pCBAgingID);
        }
    }

    protected void BindPCBAging(string pCBAgingID)
    {
        UserControl_PCBAging uc = (UserControl_PCBAging)LoadControl("~/UserControl/PCBAging.ascx");
        uc.pCBAgingID = pCBAgingID;
        this.PlaceHolder1.Controls.Add(uc);
    }
}
